package com.example.design.c.facade;

public class FacadePattern {

    public static void main(String[] args) {
        Facade facade = new Facade();
        facade.method();
    }
}

class Facade{

    private SubSystemA subSystemA = new SubSystemA();
    private SubSystemB subSystemB = new SubSystemB();
    private SubSystemC subSystemC = new SubSystemC();

    public void method(){
        subSystemA.methodA();
        subSystemB.methodB();
        subSystemC.methodC();
    }

}

class SubSystemA{

    public void methodA(){
        System.out.println("子系统A的methodA方法被调用");
    }
}

class SubSystemB{

    public void methodB(){
        System.out.println("子系统B的methodB方法被调用");
    }
}

class SubSystemC{
    public void methodC(){
        System.out.println("子系统C的methodC方法被调用");
    }
}